import { Tools } from "weaver-mobile";
import { catchApiError } from "../util/index";

export const getUserInfo = () => {
  let options = {
    method: "GET",
    url: "/api/secondev/meeting/getUserInfo",
  };
  return Tools.callApi(options).then(catchApiError);
};

export const getMeetingList = (params) => {
  let options = {
    method: "GET",
    url: "/api/secondev/meeting/getMeetingList",
    params: params,
  };
  return Tools.callApi(options).then(catchApiError);
};

export const getMeetingInfo = (params) => {
  let options = {
    method: "GET",
    url: "/api/secondev/meeting/getMeetingInfo",
    params: params,
  };
  return Tools.callApi(options).then(catchApiError);
};

export const getHistoryTidbits = (params) => {
  let options = {
    method: "GET",
    url: "/api/secondev/meeting/getHistoryTidbits",
    params: params,
  };
  return Tools.callApi(options).then(catchApiError);
};

export const getMeetingEvaluation = (params) => {
  let options = {
    method: "GET",
    url: "/api/secondev/meeting/getMeetingEvaluation",
    params: params,
  };
  return Tools.callApi(options).then(catchApiError);
};

export const getScheduling = (id) => {
  let options = {
    method: "GET",
    url: "/api/secondev/meeting/getScheduling?meetingId=" + id,
  };
  return Tools.callApi(options).then(catchApiError);
};

export const contactUs = (id) => {
  let options = {
    method: "GET",
    url: "/api/secondev/meeting/contactUs?meetingId=" + id,
  };
  return Tools.callApi(options).then(catchApiError);
};
